package com.city.statisticsservice.controller;


import com.city.commonutils.Result;
import com.city.statisticsservice.entity.StatisticsDaily;
import com.city.statisticsservice.service.StatisticsDailyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 网站统计日数据 前端控制器
 * </p>
 *
 * @author city
 * @since 2020-10-10
 */
@RestController
@RequestMapping("/staservice/sta")
@CrossOrigin
public class StatisticsDailyController {

    @Autowired
    private StatisticsDailyService statisticsDailyService;

    @GetMapping("registerCount/{day}")
    public Result registerCount(@PathVariable String day){
        StatisticsDaily statisticsDaily = statisticsDailyService.getCount(day);
        return Result.ok().data("statisticsDaily",statisticsDaily);
    }

}

